package com.canaan.business.service.home.impl;

import com.canaan.business.domain.home.ToDoListNumEntity;
import com.canaan.business.mapper.home.HomeMapper;
import com.canaan.business.service.home.HomeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * 拣货任务单Service业务层处理
 *
 * @author 
 * @date 2023年07月05日11:22:21
 */
@Service
public class HomeServiceImpl implements HomeService {

    @Resource
    private HomeMapper homeMapper;

    /**
     * 查询待办事项数量
     *
     * @param loginCode 用户名
     * @return ToDoListNumEntity
     */
    @Override
    public ToDoListNumEntity selectToDoListNum(String loginCode){
        ToDoListNumEntity returnEntity = new ToDoListNumEntity();
        // 查询采购收货待办数
        returnEntity.setReceiveNum(this.homeMapper.selectReceiveNum());
        // 查询生产入库待办数
        returnEntity.setEnterProductionNum(this.homeMapper.selectEnterProductionNum(loginCode));
        // 退料入库待办数量
        returnEntity.setEnterReturnMaterialNum(this.homeMapper.selectEnterReturnMaterialNum(loginCode));
        // 报废入库待办数量
        returnEntity.setEnterScrapNum(this.homeMapper.selectEnterScrapNum(loginCode));
        // 退货入库待办数量
        returnEntity.setEnterReturnNum(this.homeMapper.selectEnterReturnNum(loginCode));
        // 待检入库待办数量
        returnEntity.setEnterInspectedNum(this.homeMapper.selectEnterInspectedNum(loginCode));
        // 收货入库待办数量
        returnEntity.setEnterReceiptNum(this.homeMapper.selectEnterReceiptNum(loginCode));
        // 查询调拨入库待办数量
        returnEntity.setEnterAllocationNum(this.homeMapper.selectEnterAllocationNum(loginCode));
        // 查询其他入库待办数量
        returnEntity.setEnterOtherNum(this.homeMapper.selectEnterOtherNum(loginCode));
        // 查询调拨出库待办数量
        returnEntity.setOutAllotNum(this.homeMapper.selectOutAllotNum(loginCode));
        // 查询领料出库待办数量
        returnEntity.setOutPickingNum(this.homeMapper.selectOutPickingNum(loginCode));
        // 查询销售出库待办数量
        returnEntity.setOutSaleNum(this.homeMapper.selectOutSaleNum(loginCode));
        // 查询退货出库待办数量
        returnEntity.setOutReturnNum(this.homeMapper.selectOutReturnNum(loginCode));
        // 查询其他出库待办数量
        returnEntity.setOutOtherNum(this.homeMapper.selectOutOtherNum(loginCode));
        // 查询备料出库待办数量
        returnEntity.setMqNum(this.homeMapper.selectMqNum(loginCode));
        // 查询来料检待办数量
        returnEntity.setQualityIqcNum(this.homeMapper.selectQualityIqcNum());
        // 查询出货检待办数量
        returnEntity.setQualityOqcNum(this.homeMapper.selectQualityOqcNum());
        return returnEntity;
    }
}
